#pragma once

/*
 * maybe should include
 UINT	MG_KEYDOWN=0,
		MG_KEYUP=0,
		MG_LBUTTONDOWN=0,
		MG_LBUTTONUP=0,
		MG_LBUTTONDBLCLK=0,
		MG_RBUTTONDOWN=0,
		MG_RBUTTONUP=0,
		MG_RBUTTONDBLCLK=0,
		MG_TERMINATE=0,
		MG_NOTHING=0;
 */

#define MSG_KEYDOWN			(MG_KEYDOWN ? MG_KEYDOWN : MG_KEYDOWN = RegisterWindowMessage("MG_KEYDOWN"))
#define MSG_KEYUP			(MG_KEYUP ? MG_KEYUP : MG_KEYUP = RegisterWindowMessage("MG_KEYUP"))
#define MSG_LBUTTONDOWN		(MG_LBUTTONDOWN ? MG_LBUTTONDOWN : MG_LBUTTONDOWN = RegisterWindowMessage("MG_LBUTTONDOWN"))
#define MSG_LBUTTONUP		(MG_LBUTTONUP ? MG_LBUTTONUP : MG_LBUTTONUP = RegisterWindowMessage("MG_LBUTTONUP"))
#define MSG_LBUTTONDBLCLK	(MG_LBUTTONDBLCLK ? MG_LBUTTONDBLCLK : MG_LBUTTONDBLCLK = RegisterWindowMessage("MG_LBUTTONDBLCLK"))
#define MSG_RBUTTONDOWN		(MG_RBUTTONDOWN ? MG_RBUTTONDOWN : MG_RBUTTONDOWN = RegisterWindowMessage("MG_RBUTTONDOWN"))
#define MSG_RBUTTONUP		(MG_RBUTTONUP ? MG_RBUTTONUP : MG_RBUTTONUP = RegisterWindowMessage("MG_RBUTTONUP"))
#define MSG_RBUTTONDBLCLK	(MG_RBUTTONDBLCLK ? MG_RBUTTONDBLCLK : MG_RBUTTONDBLCLK = RegisterWindowMessage("MG_RBUTTONDBLCLK"))
#define MSG_TERMINATE		(MG_TERMINATE ? MG_TERMINATE : MG_TERMINATE = RegisterWindowMessage("MG_TERMINATE"))
#define MSG_NOTHING			(MG_NOTHING ? MG_NOTHING : MG_NOTHING = RegisterWindowMessage("MG_NOTHING"))

#define SERVICE_NAME		"MathGateService"
#define MATHGATE_NAME		"MathGate"

#define LOG(__msg, __p1, __p2)	{char __buf[128];sprintf_s(__buf,sizeof(__buf),__msg,__p1,__p2);MessageBox(NULL,__buf,0,0);}